﻿// Decompiled with JetBrains decompiler
// Type: UnityEngine.Resolution
// Assembly: UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E6AE6B5A-2752-4B07-9528-C8B77C62CE79
// Assembly location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll
// XML documentation location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.xml

using UnityEngine.Scripting;

#nullable disable
namespace UnityEngine
{
  /// <summary>
  ///   <para>Represents a display resolution.</para>
  /// </summary>
  [RequiredByNativeCode]
  public struct Resolution
  {
    private int m_Width;
    private int m_Height;
    private int m_RefreshRate;

    /// <summary>
    ///   <para>Resolution width in pixels.</para>
    /// </summary>
    public int width
    {
      get => this.m_Width;
      set => this.m_Width = value;
    }

    /// <summary>
    ///   <para>Resolution height in pixels.</para>
    /// </summary>
    public int height
    {
      get => this.m_Height;
      set => this.m_Height = value;
    }

    /// <summary>
    ///   <para>Resolution's vertical refresh rate in Hz.</para>
    /// </summary>
    public int refreshRate
    {
      get => this.m_RefreshRate;
      set => this.m_RefreshRate = value;
    }

    /// <summary>
    ///   <para>Returns a nicely formatted string of the resolution.</para>
    /// </summary>
    /// <returns>
    ///   <para>A string with the format "width x height @ refreshRateHz".</para>
    /// </returns>
    public override string ToString()
    {
      return UnityString.Format("{0} x {1} @ {2}Hz", (object) this.m_Width, (object) this.m_Height, (object) this.m_RefreshRate);
    }
  }
}
